﻿using DFGK_WMS.Model.Dto;
using DFGK_WMS.Model.Enum;
using DFGK_WMS.Model.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace DFGK.IService
{
    public interface IReceivingOrderDetailService
    {
        /// <summary>
        /// PC/PDA收货入库
        /// </summary>
        bool AddReceivingOrderDetail(ReceivingBillOrderDto m, out string message);

        #region PDA
        /// <summary>
        /// 开始入库（弃用，组垛完后直接调用）
        /// </summary>
        /// <param name="m"></param>
        /// <returns></returns>
        bool StartReceivingOrderDetail(StartInventoryDTO m, out string message);

        /// <summary>
        /// 完成入库
        /// </summary>
        /// <param name="putcode"></param>
        /// <param name="message"></param>
        /// <returns></returns>
        bool FinishReceivingOrderDetail(string putcode, out string message);
        /// <summary>
        /// 根据托盘查询组垛信息
        /// </summary>
        /// <param name="PalletCode"></param>
        /// <returns></returns>
        StackingReceivingsDto? GetReceivingRoderData(string PalletCode,out string message);

        /// <summary>
        /// 拣选入库时根据托盘查询库存信息
        /// </summary>
        /// <param name="palletCode"></param>
        /// <param name="message"></param>
        /// <returns></returns>
        PickReceivingsDto? GetPickReceivingsInventoryDto(string palletCode, out string message);

        /// <summary>
        /// 拣选入库
        /// </summary>
        /// <param name="m"></param>
        /// <param name="message"></param>
        /// <returns></returns>
        bool StartPickReceivingOrderDetail(PickReceivingsDto m, out string message);
        #endregion

        #region PC
        /// <summary>
        /// 显示入库单
        /// </summary>
        /// <param name="billType"></param>
        /// <param name="status"></param>
        /// <param name="warehouseid"></param>
        /// <param name="pageIndex"></param>
        /// <param name="pageSize"></param>
        /// <param name="totalCount"></param>
        /// <returns></returns>
        List<ReceivingOrderDetail> GetReceivingOrderDetailList(DateTime? startTime, DateTime? endTime, string? orderSn, int status, int pageIndex, int pageSize, out int totalCount);
        #endregion

        bool EPCGetDataIn(EPCInputModel model, out string errormsg);
        bool SubmitInventoryIn(string cellCode, out string errormsg);
    }
}
